package com.ipartek.desarrollo.beanHibernate;

// Generated 26-feb-2014 21:38:33 by Hibernate Tools 3.4.0.CR1

import static javax.persistence.GenerationType.IDENTITY;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Cnae generated by hbm2java
 */
@Entity
@Table(name = "cnae")
public class Cnae implements java.io.Serializable {

	private Integer cnaeid;
	private String cnaecod;
	private String cnaecodIntegr;
	private String cnaetitulo2009;
	private Set<Empresasagrupadas> empresasagrupadases = new HashSet<Empresasagrupadas>(
			0);

	public Cnae() {
	}

	public Cnae(String cnaecod, String cnaecodIntegr, String cnaetitulo2009,
			Set<Empresasagrupadas> empresasagrupadases) {
		this.cnaecod = cnaecod;
		this.cnaecodIntegr = cnaecodIntegr;
		this.cnaetitulo2009 = cnaetitulo2009;
		this.empresasagrupadases = empresasagrupadases;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "CNAEId", unique = true, nullable = false)
	public Integer getCnaeid() {
		return this.cnaeid;
	}

	public void setCnaeid(Integer cnaeid) {
		this.cnaeid = cnaeid;
	}

	@Column(name = "CNAECod")
	public String getCnaecod() {
		return this.cnaecod;
	}

	public void setCnaecod(String cnaecod) {
		this.cnaecod = cnaecod;
	}

	@Column(name = "CNAECodIntegr")
	public String getCnaecodIntegr() {
		return this.cnaecodIntegr;
	}

	public void setCnaecodIntegr(String cnaecodIntegr) {
		this.cnaecodIntegr = cnaecodIntegr;
	}

	@Column(name = "CNAETitulo2009")
	public String getCnaetitulo2009() {
		return this.cnaetitulo2009;
	}

	public void setCnaetitulo2009(String cnaetitulo2009) {
		this.cnaetitulo2009 = cnaetitulo2009;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "cnae")
	public Set<Empresasagrupadas> getEmpresasagrupadases() {
		return this.empresasagrupadases;
	}

	public void setEmpresasagrupadases(
			Set<Empresasagrupadas> empresasagrupadases) {
		this.empresasagrupadases = empresasagrupadases;
	}

}
